package com.caiyouxi.boss.buser.mapper;

import com.caiyouxi.boss.buser.model.SysRightsBean;
import com.caiyouxi.boss.buser.model.SysRolesBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by Administrator on 2017/10/20.
 */
@Mapper
public interface SysRightsMapper {

    //查询
    public SysRightsBean select_sys_rights(SysRightsBean bean);

    //增加
    public int add_sys_rights(SysRightsBean bean);

    //修改
    public int update_sys_rights(SysRightsBean bean);

    //删除
    public int delete_sys_rights(SysRightsBean bean);
    //逻辑删除
    public int logic_delete(SysRightsBean bean);

    //获得总条数
    public int get_count(SysRightsBean bean);

    //获取权限列表
    public List<SysRightsBean> get_right_list(SysRightsBean bean);

    //通过权限id查询角色信息
    public List<SysRolesBean> get_right_role_list(SysRightsBean bean);

    //更新角色权限
    public int update_role_right(SysRolesBean bean);


     //查询用户权限
    public List<SysRightsBean> get_sys_rights(SysRightsBean bean);


    // 查询所有的权限id
    public List<Integer> get_rights_id();

    //查询所有的权限
    public List<SysRightsBean> get_rights_list(List<Integer> list);

    //分布等级权限
    public List<SysRightsBean> get_rights_evel(@Param("parent_id") int parent_id,@Param("list") List<Integer> list);




}
